﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TrustDistrictList.ascx.cs"
    Inherits="MockPrjTeam2.Pages.Controls.TrustDistrictList" %>
<style type="text/css">
    .style1
    {
        height: 20px;
        width: 80%;
    }
    .style2
    {
        width: 178px;
        height: 20px;
    }
    .style3
    {
        height: 20px;
        width: 37%;
    }
</style>
<script type="text/javascript">
    function Confirm_Active() {
        return confirm('Do you want to make this Service active ?');
    }
</script>
<table style="width: 100%">
    <tr>
        <td class="style1">
            <asp:LinkButton ID="lbtnAll" runat="server" CommandName="0-9-a-z" OnCommand="StartWithByNames"> All </asp:LinkButton>
            |
            <asp:LinkButton ID="lbtn09" runat="server" CommandName="0-9" OnCommand="StartWithByNames"> 0-9 </asp:LinkButton>
            |
            <asp:LinkButton ID="lbtnAE" runat="server" CommandName="a-e" OnCommand="StartWithByNames"> A B C D E </asp:LinkButton>
            |
            <asp:LinkButton ID="lbtnFJ" runat="server" CommandName="f-j" OnCommand="StartWithByNames"> F G H I J </asp:LinkButton>
            |
            <asp:LinkButton ID="lbtnKN" runat="server" CommandName="k-n" OnCommand="StartWithByNames"> K L M N </asp:LinkButton>
            |
            <asp:LinkButton ID="lbtnOR" runat="server" CommandName="o-r" OnCommand="StartWithByNames"> O P Q R </asp:LinkButton>
            |
            <asp:LinkButton ID="lbtnSV" runat="server" CommandName="s-v" OnCommand="StartWithByNames"> S T U V  </asp:LinkButton>
            |
            <asp:LinkButton ID="lbtnWZ" runat="server" CommandName="w-z" OnCommand="StartWithByNames"> W X Y Z</asp:LinkButton>
        </td>
        <td class="style2">
            <asp:Button ID="btnCreate" runat="server" OnClick="btnCreate_Click" Text="Create" Width="82px"/>
        </td>
        <td class="style3">
            <asp:CheckBox ID="CheckBoxInActive" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBoxInactiveCheckedChanged"
                Text=" Include In-active" />
            &nbsp;
        </td>
    </tr>
    <tr>
        <td colspan="3">
            &nbsp; &nbsp; &nbsp;
            <asp:GridView ID="grvTrustDistrictList" runat="server" AutoGenerateColumns="False"
                OnPageIndexChanging="grvTrustDistrictList_PageIndexChanging" Width="100%" AllowPaging="True" PageSize="5">
                <Columns>
                    <asp:TemplateField HeaderText="TrustDistrictName">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButtonTrustDistrictName" runat="server" CausesValidation="false"
                                CommandArgument='<%#Eval("IsActive") %>' CommandName='<%# Eval("TrustDistrictID") %>'
                                OnClientClick='<%# !(bool)Eval("IsActive") ? "return Confirm_Active();" : string.Empty %>'
                                OnCommand="LbtnTrustDistrictName_Command"><%# Eval("TrustDistrictName")%>
                            </asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="DescriptionDistrict" HeaderText="Description" />
                    <asp:TemplateField HeaderText="TrustRegion" SortExpression="TrustRegion">
                        <ItemTemplate>
                            <asp:Label ID="LabelTrustRegion" runat="server" Text='<%# Eval("TrustRegionName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Is Active?">
                        <ItemTemplate>
                            <asp:Label ID="LabelIsActive" runat="server" Text='<%#(bool) Eval("IsActive") ? "Yes" :"No" %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                    <EmptyDataTemplate>
                        <blockquote>There are no items to show.</blockquote>
                    </EmptyDataTemplate>
                  <PagerStyle CssClass="pagination_table"></PagerStyle>
            </asp:GridView>
        </td>
    </tr>
</table>
